/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/**
 * @Title: Extractor.java
 * @Package phoenics.apeak.crawl
 * @Description
 * @author phoenics@126com
 * @date 2016-1-30 16:01:31
 * @version V1.0
 */
package phoenics.apeak.crawl;

// TODO: Auto-generated Javadoc
/**
 * The Interface Extractor.
 *
 * @Description The Interface Extractor.
 */
public interface Extractor {
	
	/**
 * Sets the params.
 *
 * @param params
 *            the new params
 * @Description Sets the params.
 */
	void setParams(String params);
	
	/**
 * Sets the url.
 *
 * @param url
 *            the new url
 * @Description Sets the url.
 */
	void setUrl(String url);
	
	/**
 * Extract.
 *
 * @param content
 *            the content
 * @Description Extract.
 */
	void extract(byte [] content);
	
	/**
 * Gets the data type.
 *
 * @return the data type
 * @Description Gets the data type.
 */
	default  DataType getDataType(){
		return DataType.HTML;
	}
	
	/**
 * Gets the discard.
 *
 * @return the discard
 * @Description Gets the discard.
 */
	default Discard getDiscard(){
		return null;
	}
}
